package com.mugu.yunying.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mugu.yunying.mapper.AdvertisingMapper;
import com.mugu.yunying.domain.Advertising;
import com.mugu.yunying.service.IAdvertisingService;

/**
 * 广告Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-03-27
 */
@Service
public class AdvertisingServiceImpl implements IAdvertisingService 
{
    @Autowired
    private AdvertisingMapper advertisingMapper;

    /**
     * 查询广告
     * 
     * @param id 广告ID
     * @return 广告
     */
    @Override
    public Advertising selectAdvertisingById(Integer id)
    {
        return advertisingMapper.selectAdvertisingById(id);
    }

    /**
     * 查询广告列表
     * 
     * @param advertising 广告
     * @return 广告
     */
    @Override
    public List<Advertising> selectAdvertisingList(Advertising advertising)
    {
        return advertisingMapper.selectAdvertisingList(advertising);
    }

    /**
     * 新增广告
     * 
     * @param advertising 广告
     * @return 结果
     */
    @Override
    public int insertAdvertising(Advertising advertising)
    {
        return advertisingMapper.insertAdvertising(advertising);
    }

    /**
     * 修改广告
     * 
     * @param advertising 广告
     * @return 结果
     */
    @Override
    public int updateAdvertising(Advertising advertising)
    {
        return advertisingMapper.updateAdvertising(advertising);
    }

    /**
     * 批量删除广告
     * 
     * @param ids 需要删除的广告ID
     * @return 结果
     */
    @Override
    public int deleteAdvertisingByIds(Integer[] ids)
    {
        return advertisingMapper.deleteAdvertisingByIds(ids);
    }

    /**
     * 删除广告信息
     * 
     * @param id 广告ID
     * @return 结果
     */
    @Override
    public int deleteAdvertisingById(Integer id)
    {
        return advertisingMapper.deleteAdvertisingById(id);
    }
}
